/**
 * 项目名：	Rumba Plan
 * 
 * 版权所有(C)，上海海鼎信息工程股份有限公司，2006，所有权利保留。
 * 
 * 文件名：	BProcessResult.java
 * 模块说明：	
 * 修改历史：
 * 2006-11-15 - lxm - 创建。
 */
package com.hd123.rumba.log.biz;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.hd123.rumba.domain.biz.SDomain;
import com.hd123.rumba.exception.BusinessException;
import com.hd123.rumba.log.IProcessLog;
import com.hd123.rumba.runtime.IPersistent;
import com.hd123.rumba.runtime.biz.BPersistent;

/**
 * 处理过程结果 | 业务层 | 实体
 * 
 * @author lxm
 * 
 */
public class BProcessResult extends BPersistent {

  private SDomain domain = null;
  private String processClassName;
  private String processUuid;
  private String processCaption;
  private String ownerKey1;
  private String ownerKey2;
  private String ownerKey3;
  private String ownerKey4;
  private Date startTime;
  private String operator;
  private Integer type;
  private String message;
  private List<BProcessLog> logs = new ArrayList();
  
  public void readFrom(IPersistent source) throws BusinessException {
    super.readFrom(source);
    if (source instanceof IProcessLog) {
      this.domain = new SDomain();
      this.domain.readFrom(((IProcessLog) source).getDomain());
      this.processClassName = ((IProcessLog) source).getProcessClassName();
      this.processUuid = ((IProcessLog) source).getProcessUuid();
      this.processCaption = ((IProcessLog) source).getProcessCaption();
      this.ownerKey1 = ((IProcessLog) source).getOwnerKey1();
      this.ownerKey2 = ((IProcessLog) source).getOwnerKey2();
      this.ownerKey3 = ((IProcessLog) source).getOwnerKey3();
      this.ownerKey4 = ((IProcessLog) source).getOwnerKey4();
      this.startTime = ((IProcessLog) source).getStartTime();
      this.operator = ((IProcessLog) source).getOperator();
      this.type = ((IProcessLog) source).getType();
      this.message = ((IProcessLog) source).getMessage();
    }
  }

  public SDomain getDomain() {
    return domain;
  }

  public void setDomain(SDomain domain) {
    this.domain = domain;
  }

  public String getOperator() {
    return operator;
  }

  public void setOperator(String operator) {
    this.operator = operator;
  }

  public String getOwnerKey1() {
    return ownerKey1;
  }

  public void setOwnerKey1(String ownerKey1) {
    this.ownerKey1 = ownerKey1;
  }

  public String getOwnerKey2() {
    return ownerKey2;
  }

  public void setOwnerKey2(String ownerKey2) {
    this.ownerKey2 = ownerKey2;
  }

  public String getOwnerKey3() {
    return ownerKey3;
  }

  public void setOwnerKey3(String ownerKey3) {
    this.ownerKey3 = ownerKey3;
  }

  public String getOwnerKey4() {
    return ownerKey4;
  }

  public void setOwnerKey4(String ownerKey4) {
    this.ownerKey4 = ownerKey4;
  }

  public String getProcessCaption() {
    return processCaption;
  }

  public void setProcessCaption(String processCaption) {
    this.processCaption = processCaption;
  }

  public String getProcessClassName() {
    return processClassName;
  }

  public void setProcessClassName(String processClassName) {
    this.processClassName = processClassName;
  }

  public String getProcessUuid() {
    return processUuid;
  }

  public void setProcessUuid(String processUuid) {
    this.processUuid = processUuid;
  }

  public Date getStartTime() {
    return startTime;
  }

  public void setStartTime(Date startTime) {
    this.startTime = startTime;
  }

  public Integer getType() {
    return type;
  }

  public void setType(Integer type) {
    this.type = type;
  }

  public List<BProcessLog> getLogs() {
    return logs;
  }

  public void setLogs(List<BProcessLog> logs) {
    this.logs = logs;
  }

  public String getMessage() {
    return message;
  }

  public void setMessage(String message) {
    this.message = message;
  }

}
